<template>
  <view class="rc-conversations">
      <!-- 导航栏 -->
    <!-- #ifndef MP-TOUTIAO -->
      <nav-bar :border="true" :leftWidth="100">
      <template v-slot:left>
        <view class="rc-conversations-nav-text">
          会话
        </view>
      </template>
    </nav-bar>
    <!-- #endif -->
    <connect-status />
    <view class="rc-conversations-list">
      <conversation-list />
    </view>
  </view>
</template>

<script setup lang="ts">
import { onShow } from '@dcloudio/uni-app';
import ConnectStatus from '@/RCUIKit/components/connect-status.vue';
import ConversationList from '@/RCUIKit/pages/conversation/conversation-list.vue';
import NavBar from '@/RCUIKit/components/nav-bar.vue';

const { conversationStore } = uni.$RongKitStore;
onShow(() => {
  conversationStore.openConversation(null);
});

// #ifdef MP-TOUTIAO
uni.setNavigationBarTitle({
  title: '会话',
});
// #endif
</script>

<style lang="scss">
	/*每个页面公共css */
  @import '../../styles/common.scss';
</style>
<style lang="scss" scoped>
@import '../../styles/_variables.scss' ;

.rc-conversations {
  display: flex;
  flex-direction: column;
  /* #ifdef APP-PLUS */
  height: 100%;
  /* #endif */

  /* #ifdef MP */
  height: 100vh;
  /* #endif */

  &-nav-text {
    font-size:  $rc-font-size-large;
    font-weight: 500;
    padding: 12px 16px;
  }
  &-list {
    flex: 1;
    overflow: hidden;
  }
}
</style>
